<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
	
	<ui:composition template="/admin.xhtml">
      <ui:define name="page.title">
         #{msg['product.list.title']}
      </ui:define>
      
      <f:metadata name="metadata">
         <f:viewParam name="searchType" value="#{product.searchType}" />
      </f:metadata>
   
      <ui:define name="admin.content">
         <p:ajaxStatus onstart="statusDialog.show();" 
                  onsuccess="statusDialog.hide();"/>  
           
         <p:dialog modal="true"  widgetVar="statusDialog" 
               header="Processando" draggable="false" 
               closable="false">
               
               <h:graphicImage value="/resources/images/loading.gif" />  
         </p:dialog>
         
         <h:form id="search-product">
         
            <p:panel header="#{msg['product.list.title']}">
               <h:panelGrid columns="3">
                  <h:outputLabel 
                     value="#{msg['product.list.label.search']}" />
                  <p:inputText id="input" value="#{product.filter}"/>
                  <p:commandButton id="btnSearch"
                     icon="ui-icon-search"
                     value="#{msg['crud.search']}"
                     update="@form" />
               </h:panelGrid>
               
               <p:spacer height="10" />
               
               <ui:include src="/product-list.xhtml" />
            </p:panel>      
         </h:form>  
      </ui:define>
   
   </ui:composition>


</html>